﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace TreasAuction
{
    public partial class mainForm : Form
    {
        public mainForm()
        {
            InitializeComponent();            
        }

        private void mainForm_Load(object sender, EventArgs e)
        {
            UpcomingAuctionGet test = new UpcomingAuctionGet();
            autionDataView.ColumnCount = 7;
            autionDataView.Dock = DockStyle.Fill;
            autionDataView.Columns[0].Name = "Term (Week/Year)";
            autionDataView.Columns[1].Name = "Term (Day/Month)";
            autionDataView.Columns[2].Name = "Type";
            autionDataView.Columns[3].Name = "CUSIP";
            autionDataView.Columns[4].Name = "Announcement";
            autionDataView.Columns[5].Name = "Auction";
            autionDataView.Columns[6].Name = "Issue";

            PendingAnnouncementData[] data = test.getAnnouncementData();

            for (int i = 0; i < data.Length; i++)
            {
                String[] arr = { data[i].SecurityTermWeekYear, 
                                 data[i].SecurityTermDayMonth,
                                 data[i].SecurityType,
                                 data[i].CUSIP,
                                 data[i].AnnouncementDate,
                                 data[i].AuctionDate,
                                 data[i].IssueDate};
                autionDataView.Rows.Add(arr);
            }
            //this.textBox1.Text = test.getAnnouncementData()[0].CUSIP;
        }
    }
}
